﻿<%@ Page Language="C#" MasterPageFile="~/JOINT/MstPage_JOINT.master" AutoEventWireup="true"
    CodeFile="frmJ_TraineeDiplomaInput.aspx.cs" Inherits="JOINT_frmJ_TraineeDiplomaInput"
    Title="入学情報（保有資格）登録" Culture="ja-JP" UICulture="ja" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    入学情報（保有資格）登録</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <link href="../Style/JsStyle.css" rel="stylesheet" type="text/css" />
    <link href="../Style/Style.css" rel="stylesheet" type="text/css" />

    <script src="../js/jquery-1.4.1.js" type="text/javascript"></script>

    <script type="text/javascript" src="../Js/jquery.min.js"></script>

    <script type="text/javascript" src="../Js/jquery.alphanumeric.pack.js"></script>

    <script type="text/javascript" src="../Js/jquery.maskedinput.js"></script>  

    <script src="../js/jquery.blockUI.js" type="text/javascript"></script>    

    <script src="../js/Validation.js" type="text/javascript"></script>

    <style type="text/css">
        .hidden
        {
            display: none;
        }
        .GVFixedHeader
        {
            display: none;
        }
        .gvHeader
        {
            background-color: Tan;
            font-weight: bold;
            height: 15px;
            padding-top: 5px;
        }
        .font
        {
            font-family: MS UI Gothic;
        }

          .visible
        {
            display: none;
        }  
    </style>

    <script type="text/javascript" language="javascript">


        $(document).ready(function() {
            startup();
        });
        function startup() {
            disableControlOnLoadUpdatePanel("","");
            //REGISTER VALIDATE
            registerControlToValidation("validation");
            //CALL METHOD FORMATDATE
            formatDate("css_text_calender", "/");



            if (document.getElementById("ctl00_ContentPlaceHolder1_btn_次登録") == null) {
                //CALL METHOD ENTEREVENT
                registerEnterEvent("next_control", "<%= btn_更新.ClientID %>", 4);

            } else {
                //CALL METHOD ENTEREVENT
                registerEnterEvent("next_control", "<%= btn_次登録.ClientID %>", 4);

            }
        }
        //COMPARE DATE INPUT WITH NOW
        function validatDateInputSmallNow(oSrc, args)// kiem tra ngay thang nhap vao nho hon ngay thang hien tai.
        {
            args.IsValid = checkYearOld(args.Value, getNowDate(new Date()), 0, "<");
        }
        //COMPARE DATE 
        function compareDate(oSrc, args) {

            args.IsValid = checkYearOld($('#<%= txt_受検年月日.ClientID%>').val(), args.Value, 0, "<");

        }
        //ENABLE CUSTOMVALIDATE
        function compareDate1(oSrc, args) {
            ValidatorEnable2(document.getElementById("ctl00_ContentPlaceHolder1_CustomValidator1"), true);
        }
        
        
    </script>

   <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
   
    <div class="maindiv1">
        <br />
        <div class="Header3">
            <span>※現在までの保有資格を全て入力してください。
                <br />
            </span>
        </div>
        <div>
            &nbsp;</div>
        <div class="detail-admin-row">
            <span class="detail-admin-label">資格免許名 :</span>
            <asp:DropDownList ID="ddl_資格免許コード" runat="server" CssClass="next_control japanese validation dropdownlist width2">
                <asp:ListItem Value="-1" Selected="True">[選択]</asp:ListItem>
            </asp:DropDownList>
            <span class="required-field">*</span>
            <asp:RequiredFieldValidator runat="server" ID="validateddl_資格免許コード" ControlToValidate="ddl_資格免許コード"
                Display="None" InitialValue="-1" ErrorMessage="" />
            <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender15"
                TargetControlID="validateddl_資格免許コード" HighlightCssClass="invalid" CssClass="CustomValidatorCalloutStyle"
                WarningIconImageUrl="../Images/warning.png" Width="240px" />
            <asp:CustomValidator ID="CustomValidator3" runat="server" ErrorMessage="CustomValidator"
                ControlToValidate="ddl_資格免許コード" Display="None" OnServerValidate="CustomValidator3_ServerValidate"></asp:CustomValidator>
            <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender9"
                TargetControlID="CustomValidator3" HighlightCssClass="invalid" CssClass="CustomValidatorCalloutStyle"
                WarningIconImageUrl="../Images/warning.png" Width="240px" />
        </div>
        <div class="detail-admin-row">
            <span class="detail-admin-label">社内外区分 :</span>
            <asp:DropDownList ID="ddl社内外区分" runat="server" CssClass="next_control validation dropdownlist width2">
                <asp:ListItem Value="-1" Selected="True">[選択]</asp:ListItem>
                <asp:ListItem Value="0">社内</asp:ListItem>
                <asp:ListItem Value="1">社外</asp:ListItem>
            </asp:DropDownList>
            <span class="required-field">*</span>
            <asp:RequiredFieldValidator runat="server" ID="validateddl社内外区分" ControlToValidate="ddl社内外区分"
                Display="None" InitialValue="-1" ErrorMessage="" />
            <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender1"
                TargetControlID="validateddl社内外区分" HighlightCssClass="invalid" CssClass="CustomValidatorCalloutStyle"
                WarningIconImageUrl="../Images/warning.png" Width="240px" />
        </div>
        <div class="detail-admin-row">
            <span class="detail-admin-label">受検年月日 :</span>
            <asp:TextBox ID="txt_受検年月日" runat="server" CausesValidation="false"
                Style="ime-mode: disabled; float: left;" MaxLength="8" CssClass="next_control css_text_calender validation textbox width_calendar"></asp:TextBox>
            <asp:ImageButton ID="ImageButton1" runat="server" CssClass="btn_calendar"
                ImageUrl="~/Images/calendar.jpg" ValidationGroup="detailform" />
            <ajaxToolkit:CalendarExtender ID="Calendar" runat="server" PopupButtonID="ImageButton1"
                TargetControlID="txt_受検年月日" Format="yyyy/MM/dd">
            </ajaxToolkit:CalendarExtender>
            <span class="required-field">*</span>
            <asp:RequiredFieldValidator runat="server" ID="validatetxt_受検年月日" ControlToValidate="txt_受検年月日"
                Display="None" ErrorMessage="" />
            <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender4"
                TargetControlID="validatetxt_受検年月日" HighlightCssClass="invalid" CssClass="CustomValidatorCalloutStyle"
                WarningIconImageUrl="../Images/warning.png" Width="240px" />
            <asp:CustomValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txt_受検年月日"
                ErrorMessage="CustomValidator" ClientValidationFunction="isDate" Display="None"></asp:CustomValidator>
            <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender8"
                TargetControlID="RegularExpressionValidator1" HighlightCssClass="invalid" CssClass="CustomValidatorCalloutStyle"
                WarningIconImageUrl="../Images/warning.png" Width="210px" />
            <asp:CustomValidator ID="CustomValidator5" runat="server" ErrorMessage="" ControlToValidate="txt_受検年月日"
                ClientValidationFunction="compareDate1" Display="None" SetFocusOnError="False"></asp:CustomValidator>
        </div>
        <div class="detail-admin-row">
            <span class="detail-admin-label">取得年月日 :</span>
            <asp:TextBox ID="txt_取得年月日" runat="server" CausesValidation="false"
                CssClass="next_control css_text_calender validation textbox width_calendar" Style="ime-mode: disabled;
                float: left;" MaxLength="8"></asp:TextBox>
            <asp:ImageButton ID="imb_取得年月日" runat="server"  CssClass="btn_calendar"
                ImageUrl="~/Images/calendar.jpg" ValidationGroup="detailform" />
            <ajaxToolkit:CalendarExtender ID="CalendarExtender3" runat="server" PopupButtonID="imb_取得年月日"
                TargetControlID="txt_取得年月日" Format="yyyy/MM/dd">
            </ajaxToolkit:CalendarExtender>
            <span class="required-field">*</span>
            <%--            <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" PopupButtonID="imb_取得年月日"
                TargetControlID="txt_取得年月日" Format="yyyy/MM/dd">
            </ajaxToolkit:CalendarExtender> --%>
            <asp:RequiredFieldValidator runat="server" ID="validatetxt_取得年月日" ControlToValidate="txt_取得年月日"
                Display="None" ErrorMessage="" />
            <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender2"
                TargetControlID="validatetxt_取得年月日" HighlightCssClass="invalid" CssClass="CustomValidatorCalloutStyle"
                WarningIconImageUrl="../Images/warning.png" Width="240px" />
            <asp:CustomValidator ID="regular2" runat="server" ErrorMessage="" ControlToValidate="txt_取得年月日"
                ClientValidationFunction="isDate" Display="None"></asp:CustomValidator>
            <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender6"
                TargetControlID="CustomValidator1" HighlightCssClass="invalid2" CssClass="CustomValidatorCalloutStyle"
                WarningIconImageUrl="../Images/warning.png" Width="230px" />
            <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="" ControlToValidate="txt_取得年月日"
                ClientValidationFunction="compareDate" Display="None"></asp:CustomValidator>
            <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender3"
                TargetControlID="regular2" HighlightCssClass="invalid1" CssClass="CustomValidatorCalloutStyle"
                WarningIconImageUrl="../Images/warning.png" Width="210px" />
        </div>
        <div class="detail-admin-row">
            <br />
            <span class="detail-admin-label">&nbsp;</span>
            <asp:Button ID="btn_次登録" runat="server" Text="次登録" CssClass="btn" OnClick="btn_次登録_Click"
                OnClientClick="javascript:focusToControlErr();" />
            <asp:Button ID="btn_更新" runat="server" Text="更新" CssClass="btn" OnClick="btn_更新_Click"
                OnClientClick="javascript:focusToControlErr();" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="btn_リセット" runat="server" Text="リセット" CssClass="btn" OnClick="btn_リセット_Click"
                ValidationGroup="123" />
        </div>
        <div style="height: 20px">
        </div>
        <div class="headerLineAndGray">
            ＊保有資格情報一覧
        </div>
        <div style="height: 20px">
        </div>
        <div class="detail-admin-row" style="margin: 10px 50px 20px 50px">
            <asp:GridView ID="grv1" runat="server" AutoGenerateColumns="False" CssClass="mGrid"
                PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" GridLines="Vertical"
                Height="40px" Width="100%">
                <Columns>
                    <asp:HyperLinkField HeaderText="資格免許名" />
                    <asp:BoundField HeaderText="社内外区分" />
                    <asp:BoundField HeaderText="受験年月日" />
                    <asp:BoundField HeaderText="取得年月日" />
                </Columns>
                <PagerSettings FirstPageText="最初" Mode="NumericFirstLast" PageButtonCount="5" LastPageText="最後" />
            </asp:GridView>
            <asp:GridView ID="grv" runat="server" AutoGenerateColumns="False" CssClass="mGrid"
                PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" GridLines="Vertical"
                Height="40px" Width="100%" OnRowCommand="ItemView_RowCommand" OnRowDataBound="grv_RowDataBound"
                OnPageIndexChanging="grv_PageIndexChanging" PageSize="10" AllowPaging="true" DataKeyNames="ID">
                <Columns>
                    <asp:TemplateField HeaderText="資格免許名">
                        <ItemTemplate>
                            <%--<asp:LinkButton ID="lk1" runat="server" CommandArgument='<%#Eval("ID") %>' CausesValidation="false"
                                CommandName="LoadUpdate"><%# Eval("資格免許名")%></asp:LinkButton>--%>
                                <%#Eval("資格免許名") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="社内外区分">
                        <ItemTemplate>
                            <%#ConvertString(Eval("社内外区分").ToString()) %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="受験年月日">
                        <ItemTemplate>
                            <%#ConvertDate(Eval("受検年月日").ToString())%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="取得年月日">
                        <ItemTemplate>
                            <%#ConvertDate(Eval("取得年月日").ToString())%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:ButtonField Text="Button" DataTextField="ID" CommandName="doubleClick" Visible="true"
                                HeaderStyle-CssClass="visible" ItemStyle-CssClass="visible" FooterStyle-CssClass="visible">
                                <FooterStyle CssClass="visible" />
                                <HeaderStyle CssClass="visible" />
                                <ItemStyle CssClass="visible" />
                    </asp:ButtonField>
                    <asp:BoundField HeaderText="" DataField="IsInit" ItemStyle-CssClass="hidden" HeaderStyle-Width="0px"
                        HeaderStyle-CssClass="hidden" />
                </Columns>
                <PagerSettings FirstPageText="最初" Mode="NumericFirstLast" PageButtonCount="5" LastPageText="最後" />
            </asp:GridView>
        </div>
        <div class="Header3">
            <span>※修正があれば、修正する行をDouble clickして画面上に修正してください。
                <br />
                ※全て登録完了したら、賞罰情報情報へボタンを押してください。
                <br />
                ※保有資格がない場合は終了ボタンを押して終了してください。 </span>
        </div>
        <div>
            &nbsp;</div>
        <div class="detail-admin-row">
            <div class="btn_back">
                <asp:Button ID="btn_キャンセル" runat="server" Text="キャンセル" OnClick="btn_キャンセル_Click"
                    CssClass="btn" ValidationGroup="detailsform" />
            </div>
            <div class="btn_next btn_next_fixeforfrmJ_TraineeLangAbilityInput">
                <div class="btn_back">
                    <asp:Button ID="btn_賞罰情報へ" runat="server" Text="賞罰情報へ" OnClick="btn_賞罰情報へ_Click"
                        CssClass="btn floatR" ValidationGroup="123" />
                </div>
                <div class="btn_back" style="margin-left: 120px">
                    <asp:Button ID="btn_終了" runat="server" Text="保存" OnClick="btn_終了_Click" CssClass="btn"
                        ValidationGroup="detailsform" />
                </div>
            </div>
        </div>
        <div>
            &nbsp;</div>
        <br />
    </div>
     </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
